<!DOCTYPE html>
<html>

  <head>
    <meta charset="UTF-8">
    <title></title>
  </head>

  <body>
    <script type="text/javascript">
      //第一题
      var i = 1;
      var sum = 0;
      while(i <= 100) {
        sum += i;
        i++;
      }
      console.log(sum);

      //第二题
      var x = 100;
      var sum1 = 0;
      while(x >= 100 && x <= 200) {
        sum1 += x;
        x = x + 2;
      }
      console.log(sum1);

      //第三题

      //第四题
      //三角形
      var a = 0;
      var b = 0;
      while(a <= 5) {
        a++;
        document.write("");
        while(b < a) {
          b++;
          document.write("*");
        }
        document.write("<br/>");
      }
    </script>
  </body>

</html>